const http = require("../../utils/http")
Page({
    data: {
        checked: true,
        data:{}
    },
    onChange(event) {
        console.log(event.detail);
        this.setData({
            checked: event.detail,
        });
    },
    

    onLoad: function (options) {
        var url=`http://localhost:3000/cart`;
        http({
            url,
            success:res=>{
                console.log(res);
                var data=res.data;
                this.setData({data})
            }
        })
    }
})